/*
 * @lc app=leetcode.cn id=2740 lang=golang
 *
 * [2740] 找出分区值
 */
package Solutions

import (
	"math"
	"slices"
)

// @lc code=start
func findValueOfPartition(nums []int) int {
	slices.Sort(nums)
	min := math.MaxInt64
	for i := 1; i < len(nums); i++ {
		t := nums[i] - nums[i-1]
		if t < min {
			min = t
		}
	}
	return min
}

// @lc code=end
